package com.medsoft.drpcp.meta;

public interface DrpcpHeadConstant {
	public static final int ERROR_NO_SUCCESS = 0;
	public static final int ERROR_NO_NOT_FOUND = -1;
	public static final String ERROR_INFO_SUCCESS = "success";
	public static final String ERROR_INFO_NOT_FOUND = "cannot find drpcp service";
	public static final int DRPCP_SERVICE_ID_OFFSET = 0;
	public static final int DRPCP_SERVICE_ID_LEN = 8;
	public static final int DRPCP_MSG_ID_OFFSET = 8;
	public static final int DRPCP_MSG_ID_LEN = 32;
	public static final int DRPCP_CRC32_OFFSET = 40;
	public static final int DRPCP_CRC32_LEN = 10;
	public static final int DRPCP_MSG_BODY_OFFSET = 50;
	public static final int DRPCP_MSG_HEAD_SIZE = 4;
	
	
	public static final int ERROR_NO_DISCONNECT_FROM_SERVER = -2;
	public static final String ERROR_INFO_DISCONNECT_FROM_SERVER = "disconnect from drpcp server";
	public static final int ERROR_NO_UNSUPPORTED_2ND_FORWARD = -3;
	public static final String ERROR_INFO_UNSUPPORTED_2ND_FORWARD = "unsupport second service forword in current version";
	public static final int ERROR_NO_CRC32_CHECK_FAIL = -4;
	public static final String ERROR_INFO_CRC32_CHECK_FAIL = "crc32 verify failed";
	public static final int ERROR_NO_DECRYPT_FAIL = -5;
	public static final String ERROR_INFO_DECRYPT_FAIL = "decrypt failed, key is incorrect or data was tampered during transmit";
}
